/*****************************************************************************
 * Copyright (C) Stacy Curl. All rights reserved.                            *
 * ------------------------------------------------------------------------- *
 * The software in this package is published under the terms of the BSD      *
 * style license a copy of which has been included with this distribution in *
 * the LICENSE.txt file.                                                     *
 *****************************************************************************/
package picounit;

public interface Registry {
	<B, D extends B> void register(Class<B> type, Class<D> implementation);
	<B, D extends B> void register(Class<B> type, D instance);

	void register(Class<?> implementation);

	void register(String key, boolean value);
	void register(String key, byte value);
	void register(String key, char value);
	void register(String key, double value);
	void register(String key, float value);
	void register(String key, int value);
	void register(String key, long value);
	void register(String key, short value);
	void register(String key, String value);

	<B> ImplementationCapturer<B> registerFactory(Class<B> type);

	public interface ImplementationCapturer<B> {
		<D extends B> ImplementationCapturer<B> add(Class<D> implementation);
		<D extends B> ImplementationCapturer<B> add(D instance);

		void done();
	}
}
